package com.kedacom.freedomLabel.viewmodel.printer;


import com.gprinter.command.LabelCommand;
import com.kedacom.freedomLabel.Options;
import com.kedacom.freedomLabel.base.BaseViewModel;
import com.kedacom.freedomLabel.model.annotation.PrinterSettingCategory;
import com.kedacom.freedomLabel.printer.GpPrinterOptions;
import com.kedacom.lego.message.LegoMessageManager;

public class GpPrinterSettingSelectViewModel extends BaseViewModel {

    public void getSelectItemData(@PrinterSettingCategory String category) {
        switch (category) {
            case PrinterSettingCategory.GAP:
                String[] gaps = GpPrinterOptions.getGap();
                LegoMessageManager.getInstance().sendMessage(Options.MSG_GET_GAP, gaps);
                break;
            case PrinterSettingCategory.SPEED:
                LabelCommand.SPEED[] speeds = GpPrinterOptions.getSpeed();
                LegoMessageManager.getInstance().sendMessage(Options.MSG_GET_SPEED, speeds);
                break;
            case PrinterSettingCategory.DIRECTION:
                LabelCommand.DIRECTION[] directions = GpPrinterOptions.getDirection();
                LegoMessageManager.getInstance().sendMessage(Options.MSG_GET_DIRECTION, directions);
                break;
            case PrinterSettingCategory.DENSITY:
                LabelCommand.DENSITY[] densities = GpPrinterOptions.getDensity();
                LegoMessageManager.getInstance().sendMessage(Options.MSG_GET_DENSITY, densities);
                break;
        }
    }
}